interface PersonInterface {
  name: string;
  age: number;
  speak(): void;
}

class Person3 implements PersonInterface {
  constructor(public name: string, public age: number) {}

  speak(): void {
    console.log(`${this.name} ${this.age}`);
  }
}